;; 最小化容器模板



(use-modules
 (gnu)
 (gnu packages)
 (gnu packages busybox)
 (luhux services compat)
 (gnu services base)
 )


(operating-system
  (host-name "rclocaltest")
  (timezone "UTC")
  (locale "en_US.utf8")

  
  ;; 引导(忽略)
  (bootloader (bootloader-configuration
	       (bootloader grub-bootloader)
	       (target "does-not-matter")))
  
    ;; 文件系统(忽略)
  (file-systems (list (file-system
			(device "does-not-matter")
			(mount-point "/")
			(type "does-not-matter"))))
  

  ;; 全局安装的包
  (packages
   (map
    specification->package
    (list
     ;; shell
     "bash"
     
     ;; 工具集
     "busybox"
     
     ;; ssl证书
     "nss-certs"
     )
    )
   )

  ;; 服务
  (services
   (list
    
    ;; log 记录服务
    (syslog-service)

    ;; 网络
    (service static-networking-service-type
	     (list (static-networking (interface "lo")
				      (ip "127.0.0.1")
				      (requirement '())
				      (provision '(loopback)))))

    ;; rc.local compat
    (service rclocal-service-type
	     (rclocal-configuration
	      (script "/tmp/rc.local0")))

    ;; 测试多个服务定义
    (service rclocal-service-type
	     (rclocal-configuration
	      (script "/tmp/rc.local1")))

    (service rclocal-service-type
	     (rclocal-configuration
	      (script "/tmp/rc.local2")))

    
    )
   )
  )
